home *** CD-ROM | disk | FTP | other *** search
- (defmodule cmlisp-ll (standard0) ()
-
- (setq Context 0)
-
- (defun the-context (v) Context)
-
- ((setter setter) the-context (lambda (v) (setq Context v)))
-
- (setq last-function-name-internal ())
-
- (defun last-function-name () last-function-name-internal)
-
- (setq last-function-arglist-internal ())
-
- (defun last-function-arglist () last-function-arglist-internal)
-
- (defmacro p-1-fn (fn other-arg)
- (let ((f-name (gensym)))
- (setq last-function-name-internal f-name)
- (setq last-function-arglist-internal '(a))
- `(defun ,f-name (a)
- (,fn ,@(append (list Context `a)
- (if other-arg (list other-arg) ()))))))
-
- (defmacro p-2-fn (fn other-arg)
- (let ((f-name (gensym)))
- (setq last-function-name-internal f-name)
- (setq last-function-arglist-internal '(a b))
- `(defun ,f-name (a b)
- (,fn ,@(append (list Context `a `b)
- (if other-arg (list other-arg) ()))))))
-
- (defmacro p-3-fn (fn other-arg)
- (let ((f-name (gensym)))
- (setq last-function-name-internal f-name)
- (setq last-function-arglist-internal '(a b))
- `(defun ,f-name (a b c)
- (,fn ,@(append (list Context `a `b `c)
- (if other-arg (list other-arg) ()))))))
-
- (export p-1-fn p-2-fn p-3-fn the-context last-function-name
- last-function-arglist)
- )
-
-
-
-
-